***********************************************
************** DATASET - CREATION *************
***********************************************
/*
In this do file, we prepare the final dataset used
to produce all the analysis (graphs and tables)
and final results.

*/

*----------------
* PATHS
*----------------
global replication `c(pwd)'
global data "$replication\Data"
global inter "$replication\Dta - Intermediate"
global final "$replication\Dta - Final"
global graphs "$replication\Graphs"

*We aggregate issuances, GDP, issuance and yield curve stats
use "$data\SpainCoreStats_Quarterly.dta", clear
merge 1:1 qy using "$final\DNSS_QuarterlyData_FranceSpain.dta"
drop _merge
merge 1:1 qy using "$final\AuctionsQuarterlyAggregation.dta"
drop _merge

*************
merge 1:1 qy using "$final\Oustanding_QuarterlyAggregation.dta"
save "$final\Master_QuarterlyData.dta", replace
